// https://leetcode.cn/problems/number-of-students-unable-to-eat-lunch/
// Created by ade on 2022/10/19.
//

class Solution {
public:
    int countStudents(vector<int> &students, vector<int> &sandwiches) {
        unordered_map<int, int> m = {};
        for (auto &i : students) m[i]++;
        for (auto &s : sandwiches) {
            if (m[s] == 0) break;
            m[s]--;
        }

        return m[0] + m[1];
    }
};